<html>
<head>
<meta name="decorator" content="edit" />
<title>角色编辑</title>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${BasePath !}/role/list.do">角色列表</a></li>
		<li class="active">
		<a href="${BasePath !}/role/form?id=${(role.id) !}">${(role.id)???string('角色编辑','角色新增')}</a></li>
	</ul>
	<div class="tab-content">
		<div class="tab-pane fade in active" id="addRole">
			<div class="row">
				<div class="col-lg-10 col-md-12 col-sm-12">
					<div class="addForm1">
						<form action="${BasePath !}/role/save.do" method="post" id="myform">
							<input type="hidden" class="form-control" id="id" name="id" value="${(role.id) !}" />
							<div id="error_con" class="tips-form">
								<ul></ul>
							</div>
							<div class="tips-form"></div>
							<div class="form-horizontal">
								<div class="form-group">
									<label>角色名称：</label>
									<div class="col-lg-6 col-md-7 col-sm-10">
										<input class="form-control input-sm txt_big2" type="text" id="name" name="name" value="${(role.name) !}" data-rule-required="true" data-msg-required="角色名不能为空">
									</div>
								</div>
							</div>
							<div class="form-horizontal">
								<div class="form-group">
									<label>角色备注：</label>
									<div class="col-md-6 col-sm-10">
										<input class="form-control input-sm txt_big2" type="text" id="remarks" name="remarks" value="${(role.remarks) !}">
									</div>
								</div>
							</div>
							<div class="form-inline">
								<div class="form-group">
									<label>是否启用：</label> 
									<input type="radio" id="useable" name="useable" value="1" ${((role.useable)?default('1')== '1')?string('checked','')}/> 是 
									<input type="radio" id="useable" name="useable" value="0" ${((role.useable)?default('1')== '0')?string('checked','')}/> 否
								</div>
							</div>
							<div class="form-horizontal">
								<div class="form-group">
									<label>数据范围：</label>
									<div class="col-md-6 col-sm-10">
										<select id="dataScope" name="dataScope"> 
											<#list dataScopes as item>
											<option value="${item.getValue()}" ${((role.dataScope)?default('')==item.getValue())?string('selected','')}>${item.getInfo()}</option>
											</#list>
										</select>
									</div>
								</div>
							</div>
							<div class="form-inline">
								<div class="form-group btn-div">
									<input type="submit" class="btn btn-primary" value="保存">
									<input type="button" class="btn btn-default" value="返回" onclick="<#if viewtype??><#if viewtype != '0'>history.go(-1);<#else>isReturn()</#if><#else>isReturn()</#if>">
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			executeValidateFrom('myform');
		});
	</script>
</body>
</html>
